#include <stdio.h>

class Range {

	private:
	float a;
	float b;
	int lock;
	
	
	
	public:
	
	Range(float a, float b) {
		lock=0;
		this->a = a;
		this->b = b;

		if(b<a){
			float c=a;
			a=b;
			b=c;
		}
	}
	
        bool rangeCheck(float x){
	
		if(a>b)
			return false;
		else{
			if(x<a || x>b){
				return false;
			}
		}
		return true;
	}
	
	float getA() {
		return a;
	}

	 bool setA(float a) {
		if(lock==0 && a<=this->b){
			this->a = a;
			return true;
		}
		return false;
	}

	float getB() {
		return b;
	}

	bool setB(float b) {
		if(lock==0 && this->a<=b){
			this->b = b;
			return true;
		}
		return false;
	}

	void lockDown(){
		lock--;
	}
	 void lockUp(){
		lock++;
	}
	
	 
	
	
};
/*
int main(){
  Range ran(1.2, 3);
  printf("Intervallo %f   %f \n",  ran.getA() , ran.getB());
  if(ran.rangeCheck(5) == false) printf("False\n");
  

return 0;
}*/




